package com.xxh.search.document;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
@Document(indexName = "xxuser",createIndex = true)
public class UserDocument {

    @Id
    private Integer uid;
    //用户名
    @Field(type = FieldType.Text,searchAnalyzer = "ik_smart",analyzer = "ik_max_word")
    private String username;
    //昵称
    @Field(type = FieldType.Text,searchAnalyzer = "ik_smart",analyzer = "ik_max_word")
    private String nickname;
    //手机号码
    private Integer phone;
    //创建时间
    private Date createtime;
    //上次登录时间
    private Date lastlogintime;
    //email
    private String email;
    //账号状态 1有效 0禁用
    private Integer status;
    //用户头像链接
    private String headimgurl;
    //客户端ID
    private String clientid;


    //用户个人简介
    @Field(type = FieldType.Text,searchAnalyzer = "ik_smart",analyzer = "ik_max_word")
    String description;
}
